package com.itheima.controller;

import javax.servlet.http.HttpSession;

public class BaseController {

    /**
     * 获取session对象的uid
     *
     * @param session
     * @return
     */
    protected final Long getUidFromSession(HttpSession session) {
        return Long.valueOf(session.getAttribute("employeeId").toString());
    }

//    /**
//     * 获取session的用户名
//     * @param session
//     * @return
//     */
//    protected final String getUsernameFromSession(HttpSession session) {
//        return session.getAttribute("username").toString();
//    }

}
